package com.zy.common.core.enums;


/**
 * 异常枚举
 *
 * @author zy
 * @since 2023/3/13 16:44
 */
public enum ErrorEnums implements BaseEnum{

    SUCCESS(200, "操作成功"),
    UNAUTHORIZED(401, "未授权"),
    SYSTEM_ERROR(500, "系统异常"),
    SYS_SERVICE_ERROR(5000, "远程调用异常"),

    USER_NOT_FOUND(10000, "用户不存在"),
    GET_VERIFICATION_CODE_ERROR(10001, "验证码获取失败"),
    GET_VERIFICATION_CODE_LOSE_EFFICACY(10002, "验证码失效"),
    GET_VERIFICATION_CODE_WRONG(10003, "验证码错误"),
    PASSWORD_IS_NOT_STANDARDIZED(10004, "用户密码不正确或不符合规范异常类"),
    LOGIN_FAILED(10005, "登录失败"),

    ;

    private Integer code;
    private String desc;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }


    private ErrorEnums(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

}
